<?php
/**
 * 菜单
 * 
 * 制作:  叶风
 * Qq:    355007778
 * Email: ye.fn@163.com
 *
 */
namespace c\link\ad;

class g extends \control
{   
	use \m\tree_g;
    var $table = '_link';
	var $orderingBy = 'ordering, id';
	
	/**
     * 调用可管理的模块菜单
     * @param int $l
     * @param int $pid
     * @return array
     */
	function m($l=-1, $pid=0)
	{        
        if (\YF_f::$login_user_id!=1){
            $a = \YF_f::initC('\c\auth\permission')->getModule();
            $w = '(t1.arr like "%_au-login%" or t1.arr like "%_au-'. $this->db->escape_a($a, '%" or t1.arr like "%_au-') .'%")';
         }
         
        return $this->res_parent($this->getLi($pid, $l, $w)); 
	}
}
